﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace UFPC.Models
{
    public class OrderViewModel
    {       
        public Order Order { get; set; }
        public OrderDetail OrderDetail { get; set; }
        public List<OrderDetail> OrderDetails { get; set; }
        public SelectList CustomerList { get; set; }
        public SelectList ProductList { get; set; }

        public OrderViewModel()
        {

        }

        public OrderViewModel(
            IList<Customer> customerList,
            IList<Product> productList)
        {
            CustomerList = new SelectList(customerList.ToList(), "CustomerId", "Name");
            ProductList = new SelectList(productList.ToList(), "ProductId", "Name");
        }
    }
}